package com.conduit.comnands;

import javax.rmi.CORBA.Util;

import com.conduit.commands.prototype.AbstractValidateValueCommand;
import com.conduit.utils.Utils;

public class ValidateValueFromWebCommand extends AbstractValidateValueCommand {

	public ValidateValueFromWebCommand() {
		// validate value from file <web address>  <regex>  <expected result>
		commandSyntax = "validate value from web\\s{2,}(.*)\\s{2,}(.*)\\s{2,}(.*)";
	}

	@Override
	protected String getFileContent(String textInput) throws Exception {
		return Utils.readFileFromWeb(textInput);
	}

	@Override
	public String getCommandName() {
		return "Validate Value From Web";
	}

}
